<cp-navbar (onClickLeft)="onClickLeft()"></cp-navbar>
<div class="loading" *ngIf="loading"><cp-loading></cp-loading></div>
<div class="container" *ngIf="!loading">
  <div class="block location">
    <p class="title" *ngIf="city.Name">当前定位城市</p>
    <div class="list">
      <div class="item" *ngIf="geoErr" (click)="getCurrentPosition()">请点击此处手动获取位置</div>
      <div class="item" *ngIf="geoing">定位中...</div>
      <div class="item" *ngIf="city.Name" (click)="selectCity(city)" [class.disabled]="disabled">
        <span> {{ city.Name }} </span> <span *ngIf="disabled">(当前城市暂未开通服务)</span>
      </div>
    </div>
  </div>
  <div class="block recent" *ngIf="recentCity.length > 0">
    <p class="title">最近访问城市</p>
    <div class="list">
      <div class="item" *ngFor="let rc of recentCity" (click)="selectCity(rc)">{{ rc.Name }}</div>
    </div>
  </div>
  <div class="block" *ngFor="let i of cityList">
    <p class="title">{{ i.Initial }}</p>
    <div class="list">
      <div class="item border-bottom" *ngFor="let j of i.CityInfo" (click)="selectCity(j)">{{ j.Name }}</div>
    </div>
  </div>
  <div class="sidebar">
    <div class="item location" *ngIf="city.Name">定位</div>
    <div class="item recent" *ngIf="recentCity.length > 0">最近</div>
    <div class="item" *ngFor="let l of searchLetter">{{ l }}</div>
  </div>
</div>
